home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Languages / Masm V6.11 / SAMPLES / NTSAMPLE / SZSEARCH / MAIN.C$ / MAIN.bin
Encoding:
Text File  |  1993-08-30  |  644 b   |  31 lines

  1. /*** MAIN.C - A test driver for a sample NT application
  2. *
  3. * Copyright (C) 1992 Microsoft Corporation
  4. *
  5. * usage : main [substring in pBuf below]
  6. *       : main is
  7. *
  8. *************************************************************************/
  9.  
  10. char * _stdcall szSearch(char * pBuf,int cbBuf,char *szTok);
  11. int      puts(char *);
  12. int      strlen(char *);
  13.  
  14. char * pBuf = "This is sample text to test our search algorithm with. Have fun with this";
  15.  
  16. int main (
  17. int     argc,
  18. char  **argv
  19. )
  20. {
  21.     char * pFound;
  22.     while(argc--) {
  23.         if (pFound = szSearch(pBuf,strlen(pBuf),argv[argc])) {
  24.             puts(pFound);
  25.         }
  26.     }
  27.     return(0);
  28. }
  29.  
  30.  
  31.